#pragma once

#include <cmath>
#include <rotor-light.hpp>

namespace rl = rotor_light;

namespace message {

struct RequestHT : rl::Message {
  static constexpr auto type_id = __LINE__;
  using Message::Message;
};

struct ResponseHT : rl::Message {
  static constexpr auto type_id = __LINE__;

  ResponseHT(rl::ActorId to, float t = NAN, float h = NAN)
      : Message(to), temperature{t}, humility{h} {}
  float temperature;
  float humility;
};

struct LogStatic : rl::Message {
  static constexpr auto type_id = __LINE__;
  LogStatic(rl::ActorId to, const char *data_) : Message(to), data{data_} {}
  const char *data;
};

struct UARTReady : rl::Message {
  static constexpr auto type_id = __LINE__;
  using Message::Message;
};

} // namespace message

using Storage =
    rl::traits::MessageStorage<rl::message::ChangeState,
                               rl::message::ChangeStateAck, message::RequestHT,
                               message::ResponseHT>;
